package book;

public class BookList{
    private Book[] books = new Book[10];
    int useSize;
    public BookList(){
        this.useSize = 3;
        books[0] = new Book();
        books[0].setBook("龙族","江南","都市玄幻",34.5);
        books[1] = new Book();
        books[1].setBook("蛊真人","蛊真人","玄幻",35.5);
        books[2] = new Book();
        books[2].setBook("剑来","烽火戏诸侯","修仙",36.5);
    }

    public int getUseSize() {
        return useSize;
    }

    public void setUseSize(int useSize) {
        this.useSize = useSize;
    }
    public Book getPosBook(int pos){
        return this.books[pos];
    }
    public void AddBook(Book book){
        books[useSize] = book;
    }

    public Book[] getBooks() {
        return books;
    }
}
